package main

import "fmt"

func main() {
	comm := maxCommon(345, 55)
	fmt.Println(comm)
}

func maxCommon(m, n int) int {
	for n != 0 {
		rem := m % n
		m = n
		n = rem
	}
	return m
}
